package com.chenjie.executor.day09;

/**
 * packageName com.chenjie.executor.day09
 *
 * @author chenjie
 * @version JDK 8
 * @className Main1 (此处以class为例)
 * @date 2024/5/27
 * @description TODO
 */
public class Main1 {

    /**
     * 三秒后执行ValueTask执行了，但是printTask会一直空转，导致主线程不退出
     * @param args
     */
    public static void main(String[] args) {
        Print1Task pringTask = new Print1Task();
        ValueTask valueTask=new ValueTask();
        Thread thread=new Thread(pringTask);
        Thread thread1=new Thread(valueTask);
        thread.start();
        thread1.start();
    }
}
